package views.windows;

import java.awt.Color;

import javax.swing.JButton;

import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

import com.toedter.calendar.JDateChooser;

public class RegisterUmpirePanel extends javax.swing.JPanel
{
	private static final long serialVersionUID = 1L;
	private JLabel CedulaLabel;
	private JLabel FechaLabel;
	private JButton RegistrarButton;
	private JButton CancelarButton;
	private JTextField ApellidoTextField;
	private JLabel ApellidoLabel;
	private JTextField NombreTextField;
	private JLabel NombreLabel;
	private JTextField CedulaTextField;
	private JDateChooser fechaChooser;

	public RegisterUmpirePanel()
	{
		super();
		initGUI();
	}

	private void initGUI()
	{
		this.setBackground(Color.WHITE);
		
		try
		{
			MigLayout thisLayout = new MigLayout();
			thisLayout.setColumnConstraints("33.0[110.0]10.0[172.0]6.0");
			thisLayout.setRowConstraints("27.0[39.0][37.0]");
			this.setLayout(thisLayout);
			this.setPreferredSize(new java.awt.Dimension(352, 254));
			{
				CedulaLabel = new JLabel();
				this.add(CedulaLabel, "cell 0 0");
				CedulaLabel.setText("Cedula");
			}
			{
				CedulaTextField = new JTextField();
				this.add(CedulaTextField, "cell 1 0 2 1,growx");
			}
			{
				NombreLabel = new JLabel();
				this.add(NombreLabel, "cell 0 1");
				NombreLabel.setText("Nombre");
			}
			{
				NombreTextField = new JTextField();
				this.add(NombreTextField, "cell 1 1 2 1,growx");
			}
			{
				ApellidoLabel = new JLabel();
				this.add(ApellidoLabel, "cell 0 2");
				ApellidoLabel.setText("Apellido");
			}
			{
				ApellidoTextField = new JTextField();
				this.add(ApellidoTextField, "cell 1 2 2 1,growx");
			}
			{
				FechaLabel = new JLabel();
				this.add(FechaLabel, "cell 0 3");
				FechaLabel.setText("Fecha de Nacimiento");
			}
			{
				fechaChooser = new JDateChooser();
				this.add(fechaChooser, "cell 1 3 2 1,growx");
			}
			{
				RegistrarButton = new JButton();
				this.add(RegistrarButton, "cell 1 4 2 1,growx");
				RegistrarButton.setText("Registrar");
			}
			{
				CancelarButton = new JButton();
				this.add(CancelarButton, "cell 1 4,growx");
				CancelarButton.setText("Cancelar");
			}
		} catch (Exception e)
		{
			e.printStackTrace();
		}
	}
	
	public void showMessage (String msg)
	{
		JOptionPane.showMessageDialog(this, msg);
	}

	public JButton getRegistrarButton()
	{
		return RegistrarButton;
	}

	public JButton getCancelarButton()
	{
		return CancelarButton;
	}

	public JTextField getApellidoTextField()
	{
		return ApellidoTextField;
	}

	public JTextField getNombreTextField()
	{
		return NombreTextField;
	}

	public JTextField getCedulaTextField()
	{
		return CedulaTextField;
	}

	public JDateChooser getFechaChooser()
	{
		return fechaChooser;
	}
}
